package com.kx.springboot.controller;

import com.kx.springboot.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class StudentController {
    @Autowired
    private StudentService studentService;

    @RequestMapping("/put")
    public Object put(String key,String value){
        studentService.put(key,value);
        return key+"放入值为:"+value;
    }
    @RequestMapping("/put1")
    public Object put1(String key,String value){
        studentService.put1(key,value);
        return key+"放入值为:"+value;
    }
    @RequestMapping("/get")
    public Object get(){
        String value = studentService.get("name");
        return value;
    }
}
